﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for DanhMuc
/// </summary>
public class EDanhMuc
{
    private int maDanhMuc;
    private string tenDanhMuc;
    private string trangThai;
    public EDanhMuc()
    { }
    public EDanhMuc(int maDanhMuc, string tenDanhMuc, string trangThai)
    {
        this.maDanhMuc = maDanhMuc;
        this.tenDanhMuc = tenDanhMuc;
        this.trangThai = trangThai;
    }
    public int MaDanhMuc
    {
        get { return this.maDanhMuc; }
        set
        {
            this.maDanhMuc = value;
        }
    }
    public string TenDanhMuc
    {
        get { return this.tenDanhMuc; }
        set
        {
            if (value == null)
                throw new Exception("tenDanhMuc not allow nullvalue.");
            this.tenDanhMuc = value;
        }
    }
    public string TrangThai
    {
        get { return this.trangThai; }
        set { this.trangThai = value; }
    }
    public override string ToString()
    {
        return this.maDanhMuc + "; " + this.tenDanhMuc + "; " + this.trangThai + "; ";
    }
    public override bool Equals(Object obj)
    {
        EDanhMuc me = (EDanhMuc)obj;
        bool ret = this.MaDanhMuc.Equals(me.MaDanhMuc);
        return ret;
    }
    public override int GetHashCode()
    {
        return this.MaDanhMuc.GetHashCode();
    }


}